package com.lninl.repository;

import com.lninl.model.Category;
import org.springframework.dao.DataAccessException;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.Collection;

/**
 * @author qinains
 */
public interface CategoryRepository extends
        PagingAndSortingRepository<Category, Long> {
    Collection<Category> findByStatus(Integer status)
            throws DataAccessException;

    Category findById(Long id) throws DataAccessException;

    Category findByName(String name) throws DataAccessException;

}
